import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import pinia from './pinia'
import vant from './utils/vant'
import directive from './utils/directive'
import globalModule from './utils/components'
import wechat from './utils/wechat'
import 'normalize.css/normalize.css'
import VConsole from 'vconsole'
import 'virtual:svg-icons-register'
import ids from 'virtual:svg-icons-names'
// vant函数样式
import 'vant/es/toast/style'
import 'vant/es/dialog/style'
import 'vant/es/notify/style'
import 'vant/es/image-preview/style'

import { VueMasonryPlugin } from 'vue-masonry'

console.time()

const env = import.meta.env.MODE
if (env === 'development') {
  console.log(ids)
  // eslint-disable-next-line no-new
  new VConsole()
}
// 全局组件
createApp(App)
  .use(wechat, {
    appid: 123,
    state: 'weixinAuthorize'
  })
  .use(router)
  .use(pinia)
  .use(vant)
  .use(directive)
  .use(globalModule)
  .use(VueMasonryPlugin)
  .mount('#app')
console.timeEnd()
